<!DOCTYPE html>
<html lang="en">
<link rel="shortcut  icon" type="image/x-icon" href="img/icon/favicon.ico" media="screen">
<!-- 框架样式 -->
<link type="text/css" rel="stylesheet" href="${static}/fonts/font-icons.min.css">
<link type="text/css" rel="stylesheet" href="${static}/css/bootstrap.min.css">
<link type="text/css" rel="stylesheet" href="${static}/plugin/layui/css/layui.css">
<link type="text/css" rel="stylesheet" href="${static}/plugin/datatable/media/css/dataTables.bootstrap.min.css">
<link type="text/css" rel="stylesheet" href="${static}/plugin/bootstrap-select/css/bootstrap-select.min.css?r=0.020456797551074324">
<link rel="stylesheet" type="text/css" href="${static}/plugin/bootstrap-datetimepicker-master/css/bootstrap-datetimepicker.css">
<link type="text/css" rel="stylesheet" href="${static}/plugin/radioCheckBox/src/pretty.min.css">
<link type="text/css" rel="stylesheet" href="${static}/plugin/materialdesignicons/css/materialdesignicons.min.css">
<link async rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/material-design-iconic-font/2.2.0/css/material-design-iconic-font.min.css"/>
<link type="text/css" rel="stylesheet" href="${static}/plugin/radioCheckBox/src/pretty.min.css">
<link type="text/css" rel="stylesheet" href="${static}/plugin/drag/drag.css">
<link type="text/css" rel="stylesheet" href="${static}/plugin/calendar/simple-calendar.css">
<link type="text/css" rel="stylesheet" href="${static}/plugin/weather/leoweather.css">
<link rel="stylesheet" type="text/css" href="${static}/plugin/imgupload/css/cropper.min.css?r=0.6207188189209538">
<link rel="stylesheet" type="text/css" href="${static}/plugin/imgupload/css/mui.min.css?r=0.9207463414125734">
<link type="text/css" rel="stylesheet" href="${static}/plugin/jquery-plugin-circliful-master/css/jquery.circliful.css">

<!-- 自定义样式 -->
<link type="text/css" rel="stylesheet" href="${static}/css/fream.css"> <!-- 顶部和侧边 -->
<link type="text/css" rel="stylesheet" href="${static}/css/iconfont.css">
<link type="text/css" rel="stylesheet" href="${static}/css/main.css?r=0.4389791385058335">
<link type="text/css" rel="stylesheet" href="${static}/css/nav.css">
<link rel="stylesheet" type="text/css" href="${static}/css/processHelper.css?r=0.07160859914374484">
<link type="text/css" rel="stylesheet" href="${static}/css/dtable.css">
<link type="text/css" rel="stylesheet" href="${static}/page/back/firstpage/css/firstpage.css"><!-- 主页css -->
<link type="text/css" rel="stylesheet" href="${static}/css/btn.css">
<link type="text/css" rel="stylesheet" href="${static}/page/back/device/css/icon.css">

<link type="text/css" rel="stylesheet" href="${static}/page/back/customprint/file/cpTemple.css">
<link type="text/css" rel="stylesheet" href="${static}/js/utils/listRight/listRight.css">
<link type="text/css" rel="stylesheet" href="${static}/plugin/checkBox/dist/checkbox.min.css">
<link type="text/css" rel="stylesheet" href="${static}/page/back/maintainRecord/swiper/swiper.min.css">
<link type="text/css" rel="stylesheet" href="${static}/js/utils/slider/slider.css">
<link type="text/css" rel="stylesheet" href="${static}/plugin/select2-develop/dist/css/select2.min.css">
<link type="text/css" rel="stylesheet" href="${static}/plugin/wdScrollTab/css/TabPanel.css?V4.1-03082101">
<link type="text/css" rel="stylesheet" href="${static}/css/adminlte.min.css">
<link type="text/css" rel="stylesheet" href="${static}/css/common.css">




<script type="text/javascript" src="${static}/js/jquery.min.js"></script>
<script type="text/javascript" src="${static}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${static}/plugin/layer/layer.js"></script>
<script type="text/javascript" src="${static}/plugin/layui/layui.js"></script>
<script type="text/javascript" src="${static}/plugin/countdown/countdown.js"></script>
<script type="text/javascript" src="${static}/js/i-jquery.js?r=85145"></script>
<script type="text/javascript" src="${static}/js/main.js?v=123"></script>
<script type="text/javascript" src="${static}/js/imgClickBig.js"></script>
<script type="text/javascript" src="${static}/js/jquery.cookie.min.js?v=123456"></script>
<script type="text/javascript" src="${static}/plugin/datatable/media/js/jquery.dataTables.js"></script>
<script type="text/javascript" src="${static}/plugin/datatable/media/js/dataTables.bootstrap.js"></script>
<script type="text/javascript" src="${static}/js/jquery.timeago.js"></script>
<script type="text/javascript" src="${static}/js/jquery.form.js"></script>
<script type="text/javascript" src="${static}/plugin/bootstrap-select/js/bootstrap-select.js"></script>
<script type="text/javascript" src="${static}/plugin/drag/drag.js"></script>
<script type="text/javascript" src="${static}/plugin/calendar/simple-calendar.js"></script>
<script type="text/javascript" src="${static}/plugin/weather/jquery.leoweather.min.js"></script>
<script type="text/javascript" src="${static}/js/material-decomposition.js?r=123sdf"></script>
<script type="text/javascript" src="${static}/js/processHelper.js?r=324242"></script>
<script type="text/javascript" src="${static}/js/checkGroup.js?r=85145"></script>
<script type="text/javascript" src="${static}/js/iDistpicker.js?r=85145"></script>
<script type="text/javascript" src="${static}/plugin/bootstrap-datetimepicker-master/js/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="${static}/plugin/bootstrap-datetimepicker-master/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
<script type="text/javascript" src="${static}/js/pmHelper.js"></script>
<script type="text/javascript" src="${static}/js/formUtil.js"></script>
<script type="text/javascript" src="${static}/js/layer-date-format.js"></script>
<script type="text/javascript" src="${static}/js/dateUtil.js"></script>
<script type="text/javascript" src="${static}/js/iUpload.js"></script>
<script type="text/javascript" src="${static}/plugin/eachrt4.1/echarts.js"></script>
<script type="text/javascript" src="${static}/plugin/jquery-plugin-circliful-master/js/jquery.circliful.js"></script>
<script type="text/javascript" src="${static}/plugin/utils/numberUtils.js"></script>
<script type="text/javascript" src="${static}/js/checkWindowClose.js"></script>
<script type="text/javascript" src="${static}/js/utils/common/fileUtils.js"></script>
<script type="text/javascript" src="${static}/js/utils/common/arrayUtils.js"></script>
<script type="text/javascript" src="${static}/js/utils/common/arrayUtils.js"></script>
<script type="text/javascript" src="${static}/js/utils/common/formUtil.js"></script>
<script type="text/javascript" src="${static}/js/utils/common/layer-tip.js"></script>

<script type="text/javascript" src="${static}/plugin/select2-develop/dist/js/select2.js"></script>
<script type="text/javascript" src="${static}/plugin/select2-develop/dist/js/pinyin.js"></script>

<!-- 生成二维码-->
<script type="text/javascript" src="${static}/plugin/qrcode/jquery.qrcode.js"></script>
<script type="text/javascript" src="${static}/plugin/qrcode/qrcode.js"></script>
<script type="text/javascript" src="${static}/plugin/qrcode/utf.js"></script>
<script type="text/javascript" src="${static}/plugin/JsBarcode-master/dist/JsBarcode.all.js"></script>

<!-- 树插件 -->
<link rel="stylesheet" href="${static}/plugin/ztree/zTreeStyle/zTreeStyle.css" />
<script type="text/javascript" src="${static}/plugin/ztree/jquery.ztree.all-3.5.min.js"></script>
<script type="text/javascript" src="${static}/js/PullDownTreeUtil2.js"></script>
<script src="${static}/plugin/jsPlumb/js/jsplumb.js"></script>
<script src="${static}/plugin/jsPlumb/flowchart-util.js"></script>

<script src="${static}/js/utils/listRight/listRightUtil.js"></script>
<script src="${static}/js/utils/checkUtils/checkUtils.js"></script>
<script src="${static}/page/back/patrolStatic/js/utils.js"></script>
<script src="${static}/js/utils/slider/slider.js"></script>
<script src="${static}/page/back/shuju/js/fullscreen.js"></script>
<script src="${static}/page/back/maintainRecord/swiper/swiper.min.js"></script>

<script  src="${static}/plugin/datatable/JSZip-2.5.0/jszip.min.js"></script>
<script  src="${static}/plugin/datatable/pdfmake-0.1.36/pdfmake.min.js"></script>
<script  src="${static}/plugin/datatable/Buttons-1.5.6/js/dataTables.buttons.js"></script>
<script  src="${static}/plugin/datatable/Buttons-1.5.6/js/buttons.flash.min.js"></script>
<script  src="${static}/plugin/datatable/Buttons-1.5.6/js/buttons.html5.js"></script>
<script  src="${static}/plugin/datatable/Buttons-1.5.6/js/buttons.print.js"></script>
<script  src="${static}/js/utils/table2excel/table2excel.js"></script>
<script  src="${static}/js/common.js"></script>

<link type="text/css" rel="stylesheet" href="${static}/page/back/maintenanceStaff/css/maintenanceStaff.css">
<link type="text/css" rel="stylesheet" href="${static}/page/back/device/css/icon.css">


<style type="text/css">
    .cycleunit, .expireunit {
        width: 32% !important;
        position: absolute;
        right: 0px;
        border-radius: 0px 5px 5px 0px;
        outline: none;
        border: 1px solid #ddd;
        padding: 0px !important;


        height: 32px;
        border: none;
        outline: none;
        top: 0;
    }

    select{
        width: 100%;
        height: 32px;
        border: none;
        padding: 0px 8px;
        outline: none;
    }


    .selectpicker-td{
        padding: 0 !important;
    }



    .wh-hover {
        position: relative;
    }

    .wh-hover>.iconfont {
        font-size: 13px;
    }

    .wh-hover:hover>div {
        display: block;
    }
    .wh-hover>div {
        display: none;
        position: absolute;
        font-size: 13px;
        border-radius: 4px;
        width: 400px;
        z-index: 9;
        text-align: left;
        padding: 10px;
        border: 1px solid #ccc;
        background: #fff;
        top: 28px;
        left: 80px;
        line-height: 20px;
    }
    #item {
        height:180px;
        resize:vertical;
        width:100%;
    }
</style>
<script>
    function closeThis(){
        $(".nav-tabs li:first").click();
    }
</script>
</head>

<body>
<div class="page-content">
    <div class="fh-subtitle">基础信息</div>
    <form action="" method="post" id="addForm" class="form-horizontal">
        <input type="text"  id="id" name="id" value="${codeAction.id!""}" class="hide">
        <table class="border" style="width: 1000px!important;">
            <tr>
                <td>类别</td>
                <td style="position: relative;">
                    <input  class="form-control-gx" readonly value="${codeAction.dictText!""}" name="dictText" id="dictText"/>
                </td>
                <td><span class="required-flag">*</span><span>序号</span></td>
                <td><input type="text" class="form-control-gx" value="${(codeAction.sort)?c!""}" name="sort" id="sort" onkeyup="value=value.replace(/[^\d]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"></td>

            </tr>
            <tr>
                <td>编码</td>
                <td><input type="text" class="form-control-gx" readonly value="${codeAction.code!""}" name="code" id="code"></td>
                <td>名称</td>
                <td style="position: relative;">
                    <input  class="form-control-gx" value="${codeAction.name!""}" name="name" id="name"/>
                </td>

            </tr>
            <tr>
                <td>说明</td>
                <td style="position: relative;" colspan="3">
                    <textarea rows="2" name="remark" class="form-control-gx">${codeAction.remark!""}</textarea>
                </td>
            </tr>
        </table>
    </form>

    <div class="text-center" style="width: 1000px; margin-top: 20px; ">
        <span class="btn btn-primary" onclick="submit()" style="width:80px;">保存</span>
    </div>

</div>

<script type="text/javascript" src="http://demo.windasoft.com:8080/windaedm/page/back/maintainPlan/js/checkForm.js"></script>
<script>
    $(function(){
        $('#blackListForm').validate({})

        $("#type").val('${codeAction.type}');
    })
    function submit() {
        if($("#type").val()==""){
            layer.msg('请选择类别', {
                icon : 2,
                time : 1500
            })
        }else if($("#code").val()==""){
            layer.msg('编码不能为空', {
                icon : 2,
                time : 1500
            })
        }else if($("#name").val()==""){
            layer.msg('名称不能', {
                icon : 2,
                time : 1500
            })
        }else{
            $.ajax({
                url : "checkByMap",
                type : "POST",
                datatype : "json",
                data :{"id":$("#id").val(),"code":$("#code").val()},
                success : function(data) {
                    debugger;
                    if (!data.data) {
                        var data = $("#addForm").serialize();
                        sys.getApiData("saveOrUpdate",data,function(data){
                            if(data.success){
                                js.showMessage(data.data);
                                js.closeCurrentTabPage(function(contentWindow){
                                    contentWindow.reload();
                                });
                            }else{

                            }
                        });
                    } else {
                        layer.msg('编码不能重复', {
                            icon : 2,
                            time : 1500
                        })
                    }
                },
                error : function(data) {
                    js.showMessage("请求异常！","","error",1500)
                }
            });

        }
    }
</script>
</body>

</html>